#pragma once
#include <chrono>
using namespace std::chrono;

class CTestTimer
{
protected:
    time_point<high_resolution_clock> m_begin;

public:
    CTestTimer() { update(); }

    ~CTestTimer() {}

    void update() { m_begin = high_resolution_clock::now(); }

    double GetSecond() { return  GetMicroSecond() * 0.000001; }

    double GetMilliSecond() { return this->GetMicroSecond() * 0.001; }

    long long GetMicroSecond() { return duration_cast<microseconds>(high_resolution_clock::now() - m_begin).count(); }
};

class CNowTime
{
public:
	static time_t GetNowTime() {
        return duration_cast<milliseconds>(high_resolution_clock::now().time_since_epoch()).count();
	}
};

